package cn.medemede.servlet.action;

import cn.medemede.dao.PatternDao;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class Patterns implements Action {

    @Override
    public String execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
        HttpSession session=request.getSession();
        session.setAttribute("pattern", PatternDao.getPattern(Integer.parseInt(request.getParameter("pid"))));
        return "PatternView";
    }
}
